<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<ui:composition>
	<p:dataTable var="role" value="#{roleModel.list}" filteredValue="#{roleModel.filteredList}" filterEvent="enter"
		resizableColumns="true" rowKey="#{role.id}"
		selection="#{roleModel.current}" selectionMode="single" paginator="true"   rows="10" rowsPerPageTemplate="5,7,10,15,20,30,40,50"
		paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
		<p:ajax event="rowSelect" update=":detailForm,:headerForm"
			listener="#{roleController.onRowSelect}"></p:ajax>
		<p:column headerText="id"  sortBy="#{role.id}"
			filterBy="#{role.id}" filterMatchMode="contains">
			<h:outputText value="#{role.id}" />
		</p:column>
		<p:column headerText="name" sortBy="#{role.name}" filterBy="#{role.name}" filterMatchMode="contains">
			<h:outputText value="#{role.name}" />
		</p:column>
		<p:column headerText="description" sortBy="#{role.description}" filterBy="#{role.description}" filterMatchMode="contains">			
			<h:outputText value="#{role.description}" />
		</p:column>
	</p:dataTable>
</ui:composition>
</html>